import { request } from '@/utils/request.js';

// 获取轮播图
export function getBanner() {
	return request({
		url: '/wallpaper/getBannerList'
	});
}

// 获取通知公告
export function getNoticeList(data = {}) {
	return request({
		url: '/news/list',
		data
	});
}

// 获取通知公告详情
export function getNoticeDetail(data = {}) {
	return request({
		url: '/news/detail',
		data
	});
}

// 查看新闻
export function previewNotice(data = {}) {
	return request({
		url: '/news/preview',
		data
	});
}

// 获取每日推荐
export function getDayRandom() {
	return request({ url: '/wallpaper/randomWall' });
}

// 获取分类列表
export function getClassList(data = {}) {
	return request({
		url: '/wallpaper/getClassList',
		data
	});
}

// 获取壁纸列表
export function getWallList(data = {}) {
	return request({
		url: '/wallpaper/getWallList',
		data
	});
}

// 用户评分
export function setWallScore(data = {}) {
	return request({
		url: '/wallpaper/setWallScore',
		data
	});
}

// 记录下载壁纸信息
export function downloadWall(data = {}) {
	return request({
		url: '/wallpaper/downloadWall',
		data
	});
}

// 壁纸详情
export function detailWall(data = {}) {
	return request({
		url: '/wallpaper/detailWall',
		data
	});
}

// 获取用户位置信息
export function getUserInfo(data = {}) {
	return request({
		url: '/wallpaper/getUserInfo',
		data
	});
}

// 查询我的下载/我的评分
export function getHistoryWallList(data = {}) {
	return request({
		url: '/wallpaper/getHistoryWallList',
		data
	});
}

// 查询我的下载/我的评分统计
export function staticHistoryCount(data = {}) {
	return request({
		url: '/wallpaper/staticHistoryCount',
		data
	});
}

// 微信登录
export function wxLogin(data = {}) {
	return request({
		url: '/userInfo/loginByWeixin',
		data
	});
}

// 退出登录
export function loginOut(data = {}) {
	return request({
		url: '/userInfo/logout',
		data
	});
}
